Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cudaq <> Superstaq integration #2423

Merged
merged 44 commits into from
Dec 10, 2024

Conversation

vtomole
Copy link
Contributor

@vtomole vtomole commented Nov 26, 2024

Checklist:

  • I have added tests to cover my changes.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.

Description

This PR allows Cudaq to talk to Superstaq . With this PR, the following code should work.

import cudaq

@cudaq.kernel
def kernel():
    qubit = cudaq.qubit()
    x(qubit)
    mz(qubit)

cudaq.set_target("infleqtion", target="cq_sqorpius_simulator")
result = cudaq.sample(kernel)
print(f"Counts from cudaq-superstaq submission: {result}")
# prints
# Counts from cudaq-superstaq submission: { 1:1000 }

Copy link

copy-pr-bot bot commented Nov 26, 2024

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

@vtomole vtomole marked this pull request as ready for review November 26, 2024 23:09
I, vtomole <[email protected]>, hereby add my Signed-off-by to this commit: bc10bec
I, vtomole <[email protected]>, hereby add my Signed-off-by to this commit: 6f444dd
I, vtomole <[email protected]>, hereby add my Signed-off-by to this commit: 64463c1
I, vtomole <[email protected]>, hereby add my Signed-off-by to this commit: ad36074

Signed-off-by: vtomole <[email protected]>
@khalatepradnya
Copy link
Collaborator

khalatepradnya commented Nov 26, 2024

/ok to test

Command Bot: Processing...

Signed-off-by: vtomole <[email protected]>
@khalatepradnya
Copy link
Collaborator

khalatepradnya commented Nov 27, 2024

/ok to test

Command Bot: Processing...

@khalatepradnya
Copy link
Collaborator

khalatepradnya commented Nov 27, 2024

/ok to test

Command Bot: Processing...

@khalatepradnya
Copy link
Collaborator

khalatepradnya commented Nov 27, 2024

/ok to test

Command Bot: Processing...

Signed-off-by: vtomole <[email protected]>
github-actions bot pushed a commit that referenced this pull request Dec 7, 2024
@khalatepradnya khalatepradnya enabled auto-merge (squash) December 7, 2024 02:34
Signed-off-by: Bharath <[email protected]>
auto-merge was automatically disabled December 7, 2024 04:17

Head branch was pushed to by a user without write access

@khalatepradnya
Copy link
Collaborator

khalatepradnya commented Dec 9, 2024

/ok to test

Command Bot: Processing...

Copy link

github-actions bot commented Dec 9, 2024

CUDA Quantum Docs Bot: A preview of the documentation can be found here.

github-actions bot pushed a commit that referenced this pull request Dec 9, 2024
@khalatepradnya
Copy link
Collaborator

khalatepradnya commented Dec 9, 2024

/ok to test

Command Bot: Processing...

@khalatepradnya khalatepradnya enabled auto-merge (squash) December 10, 2024 00:18
Copy link

CUDA Quantum Docs Bot: A preview of the documentation can be found here.

github-actions bot pushed a commit that referenced this pull request Dec 10, 2024
@bettinaheim
Copy link
Collaborator

bettinaheim commented Dec 10, 2024

/ok to test

Command Bot: Processing...

github-actions bot pushed a commit that referenced this pull request Dec 10, 2024
Copy link

CUDA Quantum Docs Bot: A preview of the documentation can be found here.

@bettinaheim bettinaheim added the enhancement New feature or request label Dec 10, 2024
@khalatepradnya khalatepradnya merged commit d87720e into NVIDIA:main Dec 10, 2024
221 of 222 checks passed
github-actions bot pushed a commit that referenced this pull request Dec 10, 2024
bettinaheim pushed a commit that referenced this pull request Dec 10, 2024
* poc infleqtion server files

Signed-off-by: Bharath <[email protected]>

* c++ existing tests links for server

Signed-off-by: Bharath <[email protected]>

* add new directory

Signed-off-by: Bharath <[email protected]>

* some debug prints in c++ tests

Signed-off-by: Bharath <[email protected]>

* draft mock qpu sketch

Signed-off-by: Bharath <[email protected]>

* add license header

Signed-off-by: Bharath <[email protected]>

* Add infleqtion python test with mockserver

* Ready to built testing wheel

* Revert testIonQ

* More reversions

* DCO Remediation Commit for vtomole <[email protected]>

I, vtomole <[email protected]>, hereby add my Signed-off-by to this commit: bc10bec
I, vtomole <[email protected]>, hereby add my Signed-off-by to this commit: 6f444dd
I, vtomole <[email protected]>, hereby add my Signed-off-by to this commit: 64463c1
I, vtomole <[email protected]>, hereby add my Signed-off-by to this commit: ad36074

Signed-off-by: vtomole <[email protected]>

* Run clang formatter

Signed-off-by: vtomole <[email protected]>

* Format with yapf

Signed-off-by: vtomole <[email protected]>

* Run yapf with Google style

Signed-off-by: vtomole <[email protected]>

* add newline at end of some new files

Signed-off-by: Bharath <[email protected]>

* remove debug bell test

Signed-off-by: Bharath <[email protected]>

* Update infleqtion.yml

Signed-off-by: vtomole <[email protected]>

* Fix a typo in cmake
* Use unused port '62447'
* Add the new sub-directory to cmake

Signed-off-by: Pradnya Khalate <[email protected]>

* some review responses + updates

Signed-off-by: Bharath <[email protected]>

* fix: commit format

Signed-off-by: Bharath <[email protected]>

* Test for all gates, modifiers
* Check observe call
* Skip the `observe` tests on C++ since the mock server returns hard-coded values
* Python `observe` test works but the expectation value may be out-of-range due to low number of shots
* `cu3` is not (yet) supported
* Updated C++ tests
* Add state prep pass in lowering pipeline
* Fix symbolic links

Signed-off-by: Pradnya Khalate <[email protected]>

* update backend name

Signed-off-by: Bharath <[email protected]>

* remove unused shots assignment

Signed-off-by: Bharath <[email protected]>

* override polling seconds and error for canceled job

Signed-off-by: Bharath <[email protected]>

* Additional tests for multiple qvectors and multiple measurements

Signed-off-by: Pradnya Khalate <[email protected]>

---------

Signed-off-by: Bharath <[email protected]>
Signed-off-by: vtomole <[email protected]>
Signed-off-by: Pradnya Khalate <[email protected]>
Co-authored-by: Bharath <[email protected]>
Co-authored-by: Bharath Thotakura <[email protected]>
Co-authored-by: Pradnya Khalate <[email protected]>
@bettinaheim bettinaheim added this to the release 0.9.1 milestone Dec 10, 2024
@vtomole
Copy link
Contributor Author

vtomole commented Dec 10, 2024

Thank you so much for the reviews @khalatepradnya , @bmhowe23 , @bettinaheim !!

@vtomole vtomole deleted the testing-server branch December 10, 2024 16:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants